package com.boboPlanet.comm.rabbitmq.factory;

import com.boboPlanet.comm.context.BusinessThreadContextHolder;
import com.boboPlanet.comm.context.LoginUserContext;
import com.boboPlanet.comm.entity.dto.PlanetMqMsg;
import com.boboPlanet.comm.enums.PlanetCommCode;
import com.boboPlanet.comm.exception.BusinessException;
import com.boboPlanet.comm.rabbitmq.producer.IMqBuild;
import com.boboPlanet.comm.thread.ThreadMdcUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.UUID;

/**
 * @Description: TODO 交换机工厂
 * @Author: mis_wu
 * @Date: 2023/6/27
 * @Company planet
 **/
@Component
@Slf4j
public class MqExchangeFactory {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void buildTopicMQ(IMqBuild mqBuild,Object data){
        new TopicExchangeHandler(rabbitTemplate,mqBuild,data);
    }

    public void buildDirectMQ(IMqBuild mqBuild){
        //Direct Impl
    }

    public void buildFanoutMQ(IMqBuild mqBuild){
        //Fanout Impl
    }


}
